import Vue from 'vue'

Vue.filter('sizeFormatter', function(value) {
  return value > 999 ? '999+' : value
})

Vue.filter('iconNameFormatter', function(value) {
  let iconName = ''
  switch (value) {
    case 1: //个人标签
      iconName = 'iconTag'
      break
    case 2: //API
      iconName = 'iconApi'
      break
    case 3: //标签
      iconName = 'iconAlbum'
      break
  }
  return iconName
})
